home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
s
/
copyboxattributes.pprx
< prev
next >
Wrap
Text File
|
1992-03-14
|
2KB
|
133 lines
/*
@BCopyBoxAttributes @P@ICopyright Gold Disk Inc., February, 1992
This Genie will copy attributes from one box to any number of other boxes.
*/
parse arg source
cr = '0a'x
address command
call SafeEndEdit.rexx()
if source = '' then
do
source = ppm_ClickOnBox("Click on box which has attributes to be copied..")
if source = 0 then exit_msg()
call ppm_SelectBox(source)
counter = 1
do forever
box = ppm_ClickOnBox("Click on boxes to which attributes will be applied..")
if box = 0 then leave
call ppm_SelectBox(box)
boxes.counter = box
counter = counter + 1
end
if counter = 1 then
exit_msg()
else
counter = counter - 1
end
else
do
if list = '' then exit_msg("Invalid Input")
do counter = 1 to words(list)
boxes.counter = word(list, counter)
end
end
call ppm_AutoUpdate(0)
attributes = "Frame"cr"FrameData"cr"Offset"cr"Angle"cr"TextWrap"cr"Hide"cr"Lock"cr"Standoff"cr"Margins"cr"Transparent"cr"Scale"cr"Tabs"cr"Position"cr"Size"
attributes = ppm_SelectFromList("Select attributes to copy..", 30, 5, 1, attributes)
if attributes = '' then exit_msg()
copy = attributes
boxnum = 0
do while copy ~= ''
parse var copy itemname '0a'x copy
interpret itemname" = ppm_GetBox"itemname"(source)"
if itemname = "Tabs" then
istring = "call SetBoxTabs(boxes.i, '"Tabs"')"
else if itemname = "FrameData" then
do
parse var FrameData fcolor '0a'x lcolor '0a'x lwght '0a'x lpat '0a'x fpat '0a'x
istring = "call ppm_SetBoxFrameData(boxes.i, fcolor, lcolor, lwght, lpat, fpat)"
end
else
istring = "call ppm_SetBox"itemname"(boxes.i, " || separate(value(itemname)) || ")"
boxnum = boxnum + 1
strings.boxnum = istring
end
call ppm_ShowStatus("Working..")
do i = 1 to counter
copy = attributes
do s = 1 to boxnum
interpret strings.s
end
end
exit_msg()
separate: procedure
do
arg string
output = ''
wrds = words(string)
if wrds = 1 then return(string)
do i = 1 to wrds - 1
output = output||word(string, i)", "
end
output = output || word(string, wrds)
return(output)
end
exit_msg: procedure
do
parse arg message
if message ~= '' then call ppm_Inform(1,message,)
call ppm_AutoUpdate(1)
call ppm_ClearStatus()
exit
end